#include "stdafx.h"
#include "MSAAPage.h"
#include "frd_AccProxyObjEx.h"

#include <string>

MSAAPage::MSAAPage(const std::wstring &content)
	:m_content(content)
	,m_document(0)
	,m_view(0)
{
	m_pPageAccessible = CBaseProxyObject::CreateAccPageObject(this);
	m_pPageTextAccessible = CBaseProxyObject::CreateAccPageTextObject(this); 
}

MSAAPage::~MSAAPage()
{
	if(m_pPageAccessible)
	{
		m_pPageAccessible->Release();
	}
	if (m_pPageTextAccessible)
	{
		m_pPageTextAccessible->Release();
	}
}

IAccessible* MSAAPage::GetPageAccessible()
{
	return m_pPageAccessible;
}

IAccessible* MSAAPage::GetPageTextAccessible()
{
	return m_pPageTextAccessible;
}

CRect MSAAPage::GetRect()
{
	CRect rcPage;
	rcPage.left = 0;
	rcPage.right = 150;
	rcPage.top = m_pageIndex*200 + m_pageIndex*10;
	rcPage.bottom = rcPage.top+200;

	return rcPage;
}
